HAL EXTI types migration

This section provides information about the HAL EXTI types migration .

HAL EXTI callback ID type definition

HAL1

HAL2

typedef enum
 {
 HAL_EXTI_COMMON_CB_ID,
 HAL_EXTI_RISING_CB_ID,
 HAL_EXTI_FALLING_CB_ID,
 } EXTI_CallbackIDTypeDef;

Removed; the callback registration in HAL2 is managed by HAL_EXTI_RegisterTriggerCallback function


HAL EXTI handle type definition

HAL1

HAL2

EXTI_HandleTypeDef;
hal_exti_handle_t;

Related concepts:


HAL EXTI configuration type definition

In HAL2, the line is directly passed as a parameter to the HAL_EXTI_Init() function, and the mode is specified separately as the second parameter in the HAL_EXTI_Enable() function.

HAL1

HAL2

typedef struct
 {
 uint32_t Line;
 uint32_t Mode;
 uint32_t Trigger;
 uint32_t GPIOSel;
 } EXTI_ConfigTypeDef;
typedef struct
 {
 /*Moved to hal_exti_line_t enum*/
 /*Moved to hal_exti_mode_t enum*/
 hal_exti_trigger_t trigger;
 hal_exti_gpio_port_t gpio_port;
 } hal_exti_config_t;

Related concept: Replaced TypeDef suffix with _t in type names